<?php
/* 
 * ebiz front
 * 
 * checkout View
 * 
 * @author allen
 * 
 */
?>
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml'>
    <head>
        <meta content='text/html; charset=utf-8' http-equiv='Content-Type' />
        <title>结算中心 - 阿基米米网上商城</title>
        <script type='text/javascript' language='javascript' src='//<?php echo ConfigConstants::$iConstants.".".DOMAIN; ?>/n/javascript/lib/jquery.js'></script>
        <script type='text/javascript' language='javascript' src='//<?php echo ConfigConstants::$iConstants.".".DOMAIN; ?>/n/javascript/frontend.js'></script>
        <link href='//<?php echo ConfigConstants::$iConstants.".".DOMAIN; ?>/t/<?php echo $config ['template_name']; ?>/css/style.css' rel='stylesheet' type='text/css' />
        <script type='text/javascript' language='javascript' src='//<?php echo ConfigConstants::$iConstants.".".DOMAIN; ?>/t/<?php echo $config['template_name']; ?>/javascript/akimimi.js'></script>
        <link href='//<?php echo ConfigConstants::$iConstants.".".DOMAIN; ?>/t/<?php echo $config ['template_name']; ?>/css/headerAndFooter.css' rel='stylesheet' type='text/css' />
        
    </head>
    <body>
        
        <!-- header part begin -->
        <?php echo HeaderView::getCommonHeaderView(); ?>
        <!-- header part end -->
        
        <input id="errorUserNameEmpty" type="hidden" value="<?php echo CHECKOUTUSERNAME; ?>" />
        <input id="errorAreaEmpty" type="hidden" value="<?php echo ERRORAREA; ?>" />
        <input id="errorOtherAreaEmpty" type="hidden" value="<?php echo CHECKOUTOTHERADDRESSEMPTY; ?>" />
        <input id="errorMobilePhoneEmpty" type="hidden" value="<?php echo CHECKOUTMOBILEPHONEEMPTY; ?>" />
        <input id="errorMobilePhone" type="hidden" value="<?php echo CHECKOUTMOBILEPHONEERROR; ?>" />
        <input id="errorEmailEmpty" type="hidden" value="<?php echo CHECKOUTEMAILEMPTY; ?>" />
        <input id="errorEmail" type="hidden" value="<?php echo CHECKOUTEMAILERROR; ?>" />
        
        <input id="errorCampusesEmpty" type="hidden" value="<?php echo CHECKOUTSELECTCAMPUSESEMPTY; ?>" />
        
        <input id="errorAddressEmpty" type="hidden" value="<?php echo CHECKOUTADDRESSEMPTY; ?>" />
        
        <input id="errorInvoiceEmpty" type="hidden" value="<?php echo CHECKOUTINVOICEEMPTY; ?>" />
        
	    <input type="hidden" id="errorEmptyCoupon" value="<?php echo CHECKOUTERRORINFOCOUPONCODE; ?>"/>
	    <input type="hidden" id="errorCouponTitle" value="<?php echo CHECKOUTERRORINFOCOUPONCODETITLE; ?>"/>
	    <input type="hidden" id="errorCouponSuccess" value="<?php echo CHECKOUTERRORINFOCOUPONCODESUCCESS; ?>"/>
	    <input type="hidden" id="errorCouponFailed" value="<?php echo CHECKOUTERRORINFOCOUPONCODEFAILED; ?>"/>
	    <input type="hidden" id="errorCouponAlreadyUse" value="<?php echo CHECKOUTERRORINFOCOUPONCODEALREADYUSE; ?>"/>
	    <input type="hidden" id="errorShipRule" value="<?php echo CHECKOUTERRORINFOSFSHIPPING; ?>"/>
        <!--
        <form id="checkOutForm" name="checkOutForm" action="/o/placeOrder" method="post" >
        -->
        <form id="checkOutForm"  name="checkOutForm" method="post" >
        
        <input type="hidden" id='hiddenUsedPromotion' name='hiddenUsedPromotion' />
        <input type="hidden" id='hiddenUsedPromotionCode' name='hiddenUsedPromotionCode' />
        <input type="hidden" id='hiddenShipRule' value="<?php echo $shipRule; ?>" />
        <!-- order info start -->
        <div id="orderInfo" class="layoutmain" style="width:1160px;">
	        <div style="width: 960px; margin-left: 100px; background-color: #fcfcfc;" >
	            <div style='margin:auto;'>
                    <img src="<?php echo ConfigConstants::getTImagePath(); ?>/dingdan_02.gif" alt="" style="width:960px;" />
                </div>
	            <!-- shopping cart part start -->
                <div class="my_cart1" style="margin-left:-6px;"><img src="<?php echo ConfigConstants::getTImagePath(); ?>/llc2.gif" width="972px" height="41"></div>
              
                <div class="my_cart2" style="margin-left:-6px;width:972px;background-image: url(<?php echo ConfigConstants::getTImagePath(); ?>/llcline.gif); background-repeat:repeat-y; ">
	             
                <div style="margin-left: 10px;margin-bottom: 10px;margin-right: 10px;">
	                <div style="font-size:14px; font-weight:bold; padding-top:10px; padding-bottom:10px; padding-left:5px;color:#333">
                                                            购物车信息
                    </div>
	                <div style="background-color:#f4f9fc; padding:3px; width:945px; border-color:#b3d9e6; border-style:solid; border-width:1px;">
	                    <div style="PADDING-BOTTOM:1px; BACKGROUND-COLOR:#d9ebf6; PADDING-LEFT: 1px; PADDING-RIGHT: 1px; PADDING-TOP:1px; width:940px; height:25px; text-align:center; line-height:25px;">
	                        <!-- 
                            <div class="text-center" style="float:left;width:100px;">商品编号</div>
                             -->
	                        <div class="text-center" style="float:left;width:200px;">商品名称</div>
	                        <div class="text-center" style="float:left;width:100px;">商品单价</div>
	                        <div class="text-center" style="float:left;width:80px;">购买数量</div>
	                        <div class="text-center" style="float:left;width:120px;">商品总价</div>
	                        <div class="text-center" style="float:left;width:100px;">商品折扣</div>
	                        <div class="text-center" style="float:left;width:60px;">不要发票</div>
	                        <div class="text-center" style="float:left;width:40px;">要发票</div>
	                        <div class="text-center" style="float:left;width:80px;">税费</div>
	                        <div class="text-center" style="float:left;width:80px;">全国联保</div>
	                        <div class="clear"></div>
	                    </div>
	                    <?php 
	                        $taxPriceTotal = 0;
	                        foreach($shoppingCartInfoToCheckout as $item) {
	                    ?>
                        <input type="hidden" value="<?php echo $item['quantity']; ?>" name="quantity[]" id='hiddenquantity_<?php echo $item['pItemId']; ?>'/>
                        <input type="hidden" value="<?php echo $item['pItemId']; ?>" name="itemId[]" />
                        <input type="hidden" value="<?php echo $item['sale_price']; ?>" name="salePrice[]" />
                        <input type="hidden" value="<?php echo $item['sale_price']; ?>" name="dealPrice[]" id='hiddenDealPrice_<?php echo $item['pItemId']; ?>' />
                        <input type="hidden" value="<?php echo $item['weight']; ?>" name="weight[]" id='hiddenWeight_<?php echo $item['pItemId']; ?>' />
                        <input type="hidden" value="0" name="isFreeShipping[]" id='hiddenIsFreeShipping_<?php echo $item['pItemId']; ?>' />
                        <input type="hidden" value="<?php echo $item['cheque_rule']; ?>" name="chequeRule[]" />
                        
                        <input type="hidden" value="<?php echo $item['ship_rule']; ?>" name="shipRule[]" />
                                               
	                    <div style="margin-bottom:10px;margin-top:10px;">
	                        <!-- 
                            <div class="text-center" style="float:left;width:100px;">
                                <span id="upc"><?php echo $item['upc']; ?></span>
                            </div>
                             -->
	                        <div class="text-center" style="float:left;width:200px;">
	                           <label title="<?php echo $item['title']; ?>"><?php echo CommonUtil::cut_str($item['title'], 20, 0); ?></label>
                            </div>
	                        <div class="text-center" style="float:left;width:100px;color:red;">
		                        <?php echo UNIT; ?>
	                            <span id="salePrice">
	                            <?php echo number_format($item['sale_price'], 2); ?>
	                            </span>
                            </div>
	                        <div class="text-center" style="float:left;width:80px;">
                                <span id="quantity"><?php echo $item['quantity']; ?></span>
                            </div>
	                        <div class="text-center" style="float:left;width:120px;color:red;">
		                        <?php echo UNIT; ?>
	                            <label id='totalPrice_<?php echo $item['pItemId']; ?>'><?php echo number_format($item['sale_price']*$item['quantity'], 2); ?></label>
	                            <input id='hiddenTotalPrice_<?php echo $item['pItemId']; ?>' type="hidden" value="<?php echo $item['sale_price']*$item['quantity']; ?>" name="total[]" />
                            </div>
	                        <div class="text-center" style="float:left;width:100px;color:red;">
		                        <?php echo UNIT; ?><span id='discountPrice_<?php echo $item['pItemId']; ?>'>0.00</span>
	                            <input type="hidden" id="hiddenDiscountPrice_<?php echo $item['pItemId']; ?>" name="hiddenDiscountPrice[]" value="0" />
                            </div>
	                        <!-- cheque rule init setting -->    
	                        <?php
	                           	$taxInfo = ChequeRuleUtil::getTaxInfoByChequeRule($item['cheque_rule']);                            
	                            $rule = $taxInfo['rule'];
	                            $taxPoint = $taxInfo['taxPoint'];
	                            $taxPrice = $taxPoint * $item['sale_price'] * $item['quantity'];
	                        ?>
                            <input type="hidden" id="hiddenTaxPrice_<?php echo $item['pItemId']; ?>" value="<?php echo $taxPrice; ?>" />
                            
	                        <?php 
	                           	if($rule == "optional"){
	                        ?>
                            <input type="hidden" id="hiddenTaxFee_<?php echo $item['pItemId']; ?>" name="hiddenTaxFee[]" value="0" />
                            <input type="hidden" id="taxRule_<?php echo $item['pItemId']; ?>" value="optional" />
	                        <div class="text-center" style="float:left;width:60px;"
                                ><div style="margin-top:5px;"><input type="radio"  name="invoiceCheck_<?php echo $item['pItemId']; ?>" value="0" checked="checked" alreadycheck="alreadycheck" onclick="javascript:CheckOut.chequeRule('hiddenTaxPrice_<?php echo $item['pItemId']; ?>', 'taxPrice_<?php echo $item['pItemId']; ?>', 'n', 'hiddenTaxFee_<?php echo $item['pItemId']; ?>', this);" /></div>
	                        </div
                            ><div class="text-center" style="float:left;width:40px;"
                                ><div style="margin-top:5px;"><input type="radio"  name="invoiceCheck_<?php echo $item['pItemId']; ?>" value="1" alreadycheck="" onclick="javascript:CheckOut.chequeRule('hiddenTaxPrice_<?php echo $item['pItemId']; ?>', 'taxPrice_<?php echo $item['pItemId']; ?>', 'y', 'hiddenTaxFee_<?php echo $item['pItemId']; ?>', this);" /></div>
	                        </div>
                            <div class="text-center" style="float:left;width:80px;color:red;">
                                <?php echo UNIT; ?><span id="taxPrice_<?php echo $item['pItemId']; ?>">0.00</span>
                            </div>
                            <div class="text-center" style="float:left;width:80px;">不需发票</div>
                            
	                        <?php }elseif($rule == "compel"){ $taxPriceTotal += $taxPrice;?>                            
                            <input type="hidden" id="hiddenTaxFee_<?php echo $item['pItemId']; ?>" name="hiddenTaxFee[]" value="<?php echo $taxPrice; ?>" />
                            <input type="hidden" id="taxRule_<?php echo $item['pItemId']; ?>" value="compel" />
	                        <div class="text-center" style="float:left;width:60px;">
	                            <div style="margin-top:5px;"><input type="radio"  name="invoiceCheck_<?php echo $item['pItemId']; ?>" value="0" disabled="disabled" /></div>
	                        </div>
	                        <div class="text-center" style="float:left;width:40px;">
	                            <div style="margin-top:5px;"><input type="radio"  name="invoiceCheck_<?php echo $item['pItemId']; ?>" value="1" checked="checked" /></div>
	                        </div>
                            <div class="text-center" style="float:left;width:80px;color:red;">
                                <?php echo UNIT; ?><span id="taxPrice_<?php echo $item['pItemId']; ?>"><?php echo number_format($taxPrice,2); ?></span>
                            </div>
                            <div class="text-center" style="float:left;width:80px;">查看</div>
                            
	                        <?php }elseif($rule == "without"){ ?>
                            <input type="hidden" id="hiddenTaxFee_<?php echo $item['pItemId']; ?>" name="hiddenTaxFee[]" value="0" />
                            <input type="hidden" id="taxRule_<?php echo $item['pItemId']; ?>" value="without" />
	                        <div class="text-center" style="float:left;width:60px;">
	                            <div style="margin-top:5px;"><input type="radio" name="invoiceCheck_<?php echo $item['pItemId']; ?>" value="0" checked="checked" /></div>
	                        </div>
	                        <div class="text-center" style="float:left;width:40px;">
	                            <div style="margin-top:5px;"><input type="radio" name="invoiceCheck_<?php echo $item['pItemId']; ?>" value="1" disabled="disabled" /></div>
	                        </div>
                            <div class="text-center" style="float:left;width:80px;color:red;">
                                <?php echo UNIT; ?><span id="taxPrice_<?php echo $item['pItemId']; ?>"><?php echo number_format($taxPrice,2); ?></span>
                            </div>
                            <div class="text-center" style="float:left;width:80px;">不需发票</div>
	                        <?php } ?>
	                        <!-- cheque rule init setting -->
	                        <div class="clear"></div>
                            
                            <div style="margin-left:30px;">
                            <?php 
	                            $orderService = new OrderService();
	                            $itemId = $item["pItemId"];
	                            $itemAttribute = $orderService->getItemAttribute($itemId);
	                            if( !empty($itemAttribute) ){
	                                foreach ($itemAttribute as $itemAttr) { ?>
		                            <span style="margin-left:10px;"><?php echo $itemAttr["attr"]; ?></span>
		                            <span style="margin-right:5px; color:#5fb820;"> [ <?php echo $itemAttr["attr_title"]; ?> ] </span>
	                            <?php  }  
	                             } ?>
                            </div>
                            
	                    </div>
	                    <?php } ?>
                        
                        <div style="margin-top:10px;margin-left:30px;display:none;" id='showCouponCode' ><?php echo CHECKOUTERRORINFOCOUPONCODETITLE; ?></div>
                        
	                    <div style="margin-top:20px;margin-bottom:10px;">
	                        <div style="margin-left:50px;float:left;"><a href="/u/cart"><font color="#ff0000">点击此处修改购物车信息</font></a></div>                     
	                        <div style="margin-right:50px; text-align:right">
	                                                                商品价格合计(不含运费)：
	                            <font color="#ff0000"><?php
								$merchandiseTotal = 0;
	                            foreach ($shoppingCartInfoToCheckout as $item) {
	                                $merchandiseTotal += $item['sale_price'] * $item['quantity'];
	                            }
	                            echo UNIT;
	                            ?>
                                <span id="merchandiseTotalTop"><?php echo number_format($merchandiseTotal, 2); ?></span>
	                            -
	                            <?php echo UNIT; ?><span id="discountPriceTop">0.00</span>
								=
								<?php echo UNIT; ?><span id="itemAllTotalTop"><?php
	                                    echo number_format($merchandiseTotal - 0, 2)
	                            ?></span>
                                </font>
	                        </div>                     
	                    </div>
	                </div>              
	            </div>
	            <!-- shopping cart part end -->
	            <!-- address part start -->
	            <div class="checkout_item" style="margin-left:10px;margin-top:10px;margin-bottom:10px;">
	                <div style="float:left;font-size:14px; font-weight:bold; padding-top:10px; padding-bottom:10px; padding-left:5px;color:#333">送货地址</div>
	                <div style="float:left;margin-top:25px;margin-left:30px;" >
	                    <span id="addressModify"><a onclick="CheckOut.addressModify();" style="cursor:pointer;">[ 添加/修改 ]</a></span>
	                    <span id="addressComplete" style="display:none;"><a onclick="CheckOut.addressComplete();" style="cursor:pointer;">[ 完成 ]</a></span>
	                </div>
	                <div class="clear"></div>
	                <div id="currentUseAddress" style="margin-top:10px;">
	                <?php
	                    if(!empty($selectAddress)){
	                        for($i = 0; $i < count($selectAddress); $i++) {
	                            if($i == 0){
	                ?>
	                            <div style="margin-left:10px;" id="address_<?php echo $selectAddress[$i]['id']; ?>"">
	                                <?php echo $selectAddress[$i]['address_1']; ?>
	                                <?php echo $selectAddress[$i]['address_2']; ?>
	                                <?php echo $selectAddress[$i]['address_3']; ?>
	                                <?php echo $selectAddress[$i]['detail_address']; ?>
	                                <?php echo "("; ?>
	                                <?php echo "收货人："; ?>
	                                <?php echo $selectAddress[$i]['name']."，"; ?>
	                                <?php echo $selectAddress[$i]['phone_number_2']; ?>
	                                <?php echo ")"; ?>
	                            </div>
	                            <div class="clear"></div>
	                <?php }}} ?>                
	                </div>
	                
                    
                    
	                <?php
	                    if(!empty($selectAddress)){//$selectAddress less than 5
	                ?>
                    <div id="addressInfo" style="display:none;">
                                                                
                        <div style="margin-top:10px;">选择你要修改的收货地址:
	                    <input type="hidden" id="existAddress" value="1" />
                        </div>
	                <?php 
	                        for($i = 0; $i < count($selectAddress); $i++) {
	                            if($i == 0){
	                ?>
			                    <input type="radio" name="address" value="<?php echo $selectAddress[$i]['id']; ?>" checked="checked" style="float:left;margin-top:10px;" onclick="CheckOut.useTheAddressInfo();" />
	                            <div  style="margin-top:10px;" id="address_<?php echo $selectAddress[$i]['id']; ?>">
			                        <span id="province_<?php echo $selectAddress[$i]['id']; ?>"><?php echo $selectAddress[$i]['address_1']; ?></span>
			                        <span id="cityName_<?php echo $selectAddress[$i]['id']; ?>"><?php echo $selectAddress[$i]['address_2']; ?></span>
			                        <span id="districtName_<?php echo $selectAddress[$i]['id']; ?>"><?php echo $selectAddress[$i]['address_3']; ?></span>
			                        <span id="otherAddress_<?php echo $selectAddress[$i]['id']; ?>"><?php echo $selectAddress[$i]['detail_address']; ?></span>
			                        <?php echo " ( "; ?>
			                        <?php echo "收货人："; ?>
			                        <span id="userName_<?php echo $selectAddress[$i]['id']; ?>"><?php echo $selectAddress[$i]['name']; ?></span>,  
			                        <span id="mobileTelephone_<?php echo $selectAddress[$i]['id']; ?>"><?php echo $selectAddress[$i]['phone_number_2']; ?></span>
			                        <?php echo " ) "; ?>
			                    </div>
	                            <div class="clear"></div>
	                            <?php }else{ ?>
			                    <input type="radio" name="address" value="<?php echo $selectAddress[$i]['id']; ?>" style="float:left;margin-top:10px;" onclick="CheckOut.useTheAddressInfo();" />
	                            <div  style="margin-top:10px;" id="address_<?php echo $selectAddress[$i]['id']; ?>">
			                        <span id="province_<?php echo $selectAddress[$i]['id']; ?>"><?php echo $selectAddress[$i]['address_1']; ?></span>
			                        <span id="cityName_<?php echo $selectAddress[$i]['id']; ?>"><?php echo $selectAddress[$i]['address_2']; ?></span>
			                        <span id="districtName_<?php echo $selectAddress[$i]['id']; ?>"><?php echo $selectAddress[$i]['address_3']; ?></span>
			                        <span id="otherAddress_<?php echo $selectAddress[$i]['id']; ?>"><?php echo $selectAddress[$i]['detail_address']; ?></span>
			                        <?php echo "("; ?>
			                        <?php echo "收货人："; ?>
			                        <span id="userName_<?php echo $selectAddress[$i]['id']; ?>"><?php echo $selectAddress[$i]['name']; ?></span>, 
			                        <span id="mobileTelephone_<?php echo $selectAddress[$i]['id']; ?>"><?php echo $selectAddress[$i]['phone_number_2']; ?></span>
			                        <?php echo ")"; ?>
			                    </div>
	                            <div class="clear"></div>
	                <?php 
	                            }
	                ?>
	                            <input type="hidden" id="phone_<?php echo $selectAddress[$i]['id']; ?>" value="<?php echo $selectAddress[$i]['phone_number_1']; ?>" />
	                            <input type="hidden" id="email_<?php echo $selectAddress[$i]['id']; ?>" value="<?php echo $selectAddress[$i]['email']; ?>" />
	                            <input type="hidden" id="addressid_<?php echo $selectAddress[$i]['id']; ?>" value="<?php echo $selectAddress[$i]['addressid_1']; ?>" />
	                <?php 
	                        }
	                ?>
                    </div>
                    <div  style="margin-top:10px;">    
                        <span id="useAddressBtn" style="display:none;"><input type="button" value="使用该地址" onclick="javascript:CheckOut.useTheAddressInfo();" /></span>
                        <span id="addAddressBtn" style="display:none;"><input id="addNewAddressBtn" type="button" value="添加新地址" onclick="javascript:CheckOut.showAddAddressInfo();" /></span>
                    </div>   
                    
                                                 
	                <?php 
	                    }else{
	                ?>
                    
                    <div id="addressInfo"  style="margin-top:10px;">
	                   <input type="hidden" id="existAddress" value="0" />
	                </div>
	                <div  style="margin-top:10px;">    
	                    <span id="useAddressBtn" style="display:none; margin-right:10px;"><input type="button" value="使用该地址" onclick="javascript:CheckOut.useTheAddressInfo();" /></span>
	                    <span id="addAddressBtn"><input id="addNewAddressBtn" type="button" value="添加新地址" onclick="javascript:CheckOut.showAddAddressInfo();" /></span>
	                </div>
                    
                    <?php 
                        }
                    ?>                    
                    
	                <div id="addAddress" style="display:none;">
	                    <div style="margin-top:10px;">
	                                                                收货人：&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	                        <input id="addUserName" type="text" />
	                        <span id="errorUserName"></span>
	                    </div>
	                    <div style="margin-top:10px;">
	                        <div style="float:left;">所在地区：&nbsp;&nbsp;</div>
	                        <?php echo CommonUtil::getCityDictHtml(); ?>
                            <span id='errorAreaDict' ></span>
	                    </div>    
	                    <div style="margin-top:10px;">
	                        <div style="float:left;">收货地址：&nbsp;&nbsp;</div>
                            <div style="float:left;">
		                        <textarea id="addOtherAddress" rows="2" cols="35" name="" ></textarea>
		                        <span id="errorOtherAddress"></span>
                            </div>
                            <div class="clear"></div>
	                    </div>
	                    <div style="margin-top:10px;">固定电话：&nbsp;&nbsp;<input id="addPhone" type="text" /></div>
	                    <div style="margin-top:10px;">
	                                                                手机：&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	                        <input id="addMobileTelephone" type="text" />
	                        <span id="errorMobilePhoneInfo"></span>
	                    </div>
	                    <div style="margin-top:10px;">
	                                                                电子邮箱：&nbsp;
	                        <input id="addEmail" type="text" />
	                        <span id="errorEmailInfo"></span>
	                    </div>
	                    <div style="margin-left:50px;margin-top:10px;">
	                        <input type="button" value="添加" onclick="javascript:CheckOut.addNewAddress();" />
	                        <input type="button" value="取消" onclick="javascript:CheckOut.cancelAdd();" />
	                    </div>
	                </div>
	            </div>
	            <!-- address part end -->
	            <!-- shipping part start -->
	            <div class="checkout_item" style="margin-left:10px;margin-top:10px;margin-bottom:10px;">
	                <div style="float:left;font-size:14px; font-weight:bold; padding-top:10px; padding-bottom:10px; padding-left:5px;color:#333"">送货方式</div>
	                <div style="float:left;margin-top:25px;margin-left:30px;">
	                    <span id="shippingModify"><a style="cursor:pointer;" onclick="CheckOut.shippingModify();">[ 修改 ]</a></span>
	                    <span id="shippingComplete" style="display:none;"><a style="cursor:pointer;" onclick="CheckOut.shippingComplete();">[ 完成 ]</a></span>
	                </div>
	                <div class="clear"></div>
	                <div>
	                    <div style="float:left;width:170px;height:30px;line-height:30px;padding-left:30px;">送货方式</div>
	                    <div class="text-center" style="float:left;width:100px;">快递费用</div>
	                    <div class="text-center" style="float:left;width:100px;">到货时间</div>
	                    <div class="text-center" style="float:left;width:100px;">备注</div>
	                    <div class="clear"></div>
	                </div>                    
	                
	                <!-- 去掉代理送货 delete by xiaoyuemian 201003301448 -->
                    <?php //if( $_SESSION['certf'] == 1 && empty( $_SESSION['campusId'] ) ){ ?>
	                <!-- <div id="collegesDeliver" style="display:none;">
	                    <div style="float:left;width:200px;">
	                        <input type="radio" name="deliveryRadio" value="3" onclick="CheckOut.saveDelivery();" />
	                                                                高校代理送货 
	                    </div>
	                    <div class="text-center" style="float:left;width:100px;">无</div>
	                    <div class="text-center" style="float:left;width:100px;">2-4天</div>
	                    <div class="text-center" style="float:left;width:100px;">仅限在校大学生</div>
	                    <div class="clear"></div>
	                </div> -->
                    <?php //}else{ ?>
	                <!-- <div id="collegesDeliver">
	                    <div style="float:left;width:200px;">
	                        <input type="radio" name="deliveryRadio" checked="checked" value="3" onclick="CheckOut.saveDelivery();" />
	                                                                高校代理送货 
	                    </div>
	                    <div class="text-center" style="float:left;width:100px;">无</div>
	                    <div class="text-center" style="float:left;width:100px;">2-4天</div>
	                    <div class="text-center" style="float:left;width:100px;">仅限在校大学生</div>
	                    <div class="clear"></div>
	                </div> -->
                    <?php //} ?>
                    
                    <!-- 去掉代理送货 delete by xiaoyuemian 201003301448 -->
                    <?php //if( $_SESSION['certf'] == 1 && empty( $_SESSION['campusId'] ) ){ ?>
	                <div id="normalDeliver">
	                    <div style="float:left;width:200px;">
                            <input type="radio" name="deliveryRadio" checked="checked" value="1" onclick="CheckOut.saveDelivery();" />
	                                                               普通快递(申通、圆通) 
                        </div>
	                    <div class="text-center" style="float:left;width:100px;">
                            <span id="shipPriceNormal"><?php echo Order::$normalWeightFee; ?></span>
                            <input type="hidden" id="hiddenShipPriceNormal" />
                        </div>
	                    <div class="text-center" style="float:left;width:100px;">3-4天</div>
	                    <div class="text-center" style="float:left;width:100px;">备注</div>
	                    <div class="clear"></div>
	                </div>
                    <?php //}else{ ?>
	                <!-- <div id="normalDeliver" style="display:none;">
	                    <div style="float:left;width:200px;">
                            <input type="radio" name="deliveryRadio" value="1" onclick="CheckOut.saveDelivery();" />
	                                                                普通快递(申通、圆通) 
	                    </div>
	                    <div class="text-center" style="float:left;width:100px;">
                            <span id="shipPriceNormal"><?php echo Order::$normalWeightFee; ?></span>
                            <input type="hidden" id="hiddenShipPriceNormal" />
                        </div>
	                    <div class="text-center" style="float:left;width:100px;">3-4天</div>
	                    <div class="text-center" style="float:left;width:100px;">备注</div>
	                    <div class="clear"></div>
	                </div> -->
                    <?php //} ?>
                    
	                <div id="sfDeliver" style="display:none;">
	                    <div style="float:left;width:200px;">
	                        <input type="radio" name="deliveryRadio" value="5" onclick="CheckOut.saveDelivery();" />
	                                                                 顺丰快递 
                             <input type="hidden" id="exceptionProvince" value="1" />
	                    </div>
	                    <div class="text-center" style="float:left;width:100px;">
                            <span id="shipPriceSF"><?php echo Order::$SFWeightFee; ?></span>
                            <input type="hidden" id="hiddenShipPriceSF" />
                        </div>
	                    <div class="text-center" style="float:left;width:100px;">2-3天</div>
	                    <div class="text-center" style="float:left;width:100px;">备注</div>
	                    <div style="float:left;width:400px;display:none;color:red;" id="errorSFInfo"><?php echo CHECKOUTERRORINFOSFSHIPPING; ?></div>
	                    <div class="clear"></div>
	                </div>
	                <div id="EMSDeliver" style="display:none;">
	                    <div style="float:left;width:200px;">
	                        <input type="radio" name="deliveryRadio" value="2" onclick="CheckOut.saveDelivery();" />
	                        EMS
	                    </div>
	                    <div class="text-center" style="float:left;width:100px;">
                            <span id="shipPriceEMS"><?php echo Order::$EMSWeightFee; ?></span>
                            <input type="hidden" id="hiddenShipPriceEMS" />
                        </div>
	                    <div class="text-center" style="float:left;width:100px;">3-5天</div>
	                    <div class="text-center" style="float:left;width:100px;">备注</div>
	                    <div class="clear"></div>
	                </div>
                    
                    <!-- 去掉代理送货 delete by xiaoyuemian 201003301448 -->
                    <?php //if( $_SESSION['certf'] == 1 && empty( $_SESSION['campusId'] ) ){ ?>
	                <!-- <div id="selectColleges" style="display:none;">
	                    <span style="margin-left:30px;">请选择高校</span>
	                    <span style="margin-left:50px;"> -->
	                    	<input id="campusesName" name="campusesName" type="hidden" readonly="readonly" /> <!-- 去掉代理送货 edited by xiaoyuemian 201003311448 -->
	                    <!-- </span>
	                    <span style="margin-left:50px;">如果您所在的高校不在列表中，您可以选择“普通快递”或申请成为校园代理。</span> -->
                        <input type="hidden" id="campusesId" name="campusesId" />
	                <!-- </div>
	                <div id="selectDeputy" style="margin-top:5px;margin-bottom:5px;"> -->
	                    <!-- <span style="margin-left:30px;">选择离你最近的代理人：</span>
	                    <span style="margin-left:50px;"><input type="radio" checked="checked" value="yjw" name=""/>同学</span> -->
	                <input type="hidden" id="deliveryDate" name="deliveryDate" value="4" /> <!-- 去掉代理送货 added by xiaoyuemian 201003311448 -->
	                <!-- </div>
	                <div id="selectTime" style="display:none;">
	                    <span style="margin-left:30px;">送货时间：</span>
	                    <span style="margin-left:50px;"><input id="deliveryDate" type="radio" value="1" name="deliveryDate"/>上午(09:00-12:00)</span>
	                    <span style="margin-left:5px;"><input id="deliveryDate" type="radio" value="2" name="deliveryDate"/>下午(13:00-17:00)</span>
	                    <span style="margin-left:5px;"><input id="deliveryDate" type="radio" value="3" name="deliveryDate"/>晚上(18:00-22:00)</span>
	                    <span style="margin-left:5px;"><input id="deliveryDate" type="radio" checked="checked" value="4" name="deliveryDate"/>不限</span>                 
	                </div>
                     -->
                    <?php //}else{ ?>
                    
                    <!-- <div id="selectColleges">
                        <span style="margin-left:30px;">请选择高校</span>
                        <span style="margin-left:50px;"><input id="campusesName" name="campusesName" type="text" onclick="javascript:CheckOut.showAllCampuses();" readonly="readonly" size="30" /></span>
                        <span style="margin-left:50px;">如果您所在的高校不在列表中，您可以选择“普通快递”或申请成为校园代理。</span>
                        <input type="hidden" id="campusesId" name="campusesId" />
                    </div>
                    <div id="selectDeputy" style="margin-top:5px;margin-bottom:5px;"> -->
                        <!-- <span style="margin-left:30px;">选择离你最近的代理人：</span>
                        <span style="margin-left:50px;"><input type="radio" checked="checked" value="yjw" name=""/>同学</span> -->
                    <!-- </div>
                    <div id="selectTime">
                        <span style="margin-left:30px;">送货时间：</span>
                        <span style="margin-left:50px;"><input id="deliveryDate" type="radio" value="1" name="deliveryDate"/>上午(09:00-12:00)</span>
                        <span style="margin-left:5px;"><input id="deliveryDate" type="radio" value="2" name="deliveryDate"/>下午(13:00-17:00)</span>
                        <span style="margin-left:5px;"><input id="deliveryDate" type="radio" value="3" name="deliveryDate"/>晚上(18:00-22:00)</span>
                        <span style="margin-left:5px;"><input id="deliveryDate" type="radio" checked="checked" value="4" name="deliveryDate"/>不限</span>                 
                    </div> -->
                    
                    <?php //} ?>
                    
                    
	            </div>
	            <!-- shipping part end -->
	            <!-- payment part start -->
	            <div class="checkout_item" style="margin-left:10px;margin-top:10px;margin-bottom:10px;">
	                <div style="float:left;font-size:14px; font-weight:bold; padding-top:10px; padding-bottom:10px; padding-left:5px;color:#333"">支付方式</div>
	                <div style="float:left;margin-top:25px;margin-left:30px;">
	                    <span id="paymentModify"><a onclick="javascript:CheckOut.paymentModify();" style="cursor:pointer;">[ 修改 ]</a></span>
	                    <span id="paymentComplete" style="display:none;"><a onclick="javascript:CheckOut.paymentComplete();" style="cursor:pointer;">[ 完成 ]</a></span>
	                </div>
	                <div class="clear"></div>
	                
                    <?php if( $_SESSION['certf'] == 1 && empty( $_SESSION['campusId'] ) ){ ?>
                    
	                <!-- <div id="collegesPayment" style="margin-left:10px;display:none;">               
	                    <div>
	                        <div style="float:left;width:200px;">货到付款</div>
	                        <div style="float:left;width:200px;">选择您所在的区域</div>
	                        <div style="float:left;width:200px;">备注</div>
	                        <div class="clear"></div>
	                    </div>  
	                    <div>
	                        <div style="width:200px;">
	                            <input type="radio" value="1" onclick="javascript:CheckOut.savePay();" name="radioPay" />
	                                                                          高校货到付款
	                        </div>
	                    </div>
	                </div>   -->
	                
	                <div id="alipayPayment" style="margin-top:10px;margin-left:10px;">
		                <div>
		                    <div style="float:left;width:200px;">网上第三方支付</div>
		                    <div style="float:left;width:200px;">汇入账号</div>
		                    <div style="float:left;width:200px;">如何支付</div>
		                    <div class="clear"></div>
		                </div>      
		                <div>
		                    <div style="float:left;width:200px;">
		                        <input type="radio" value="3" onclick="javascript:CheckOut.savePay();" name="radioPay" checked="checked" />
		                                                                支付宝 
		                    </div>
		                    <div style="float:left;width:200px;">pay@akimimi.com</div>
		                    <div style="float:left;width:200px;">
		                        <a href="#">查看详细帮助</a>
		                    </div>
		                    <div class="clear"></div>
		                </div>
	                </div>
	                
	                <div id="bankPayment" style="margin-top:10px;margin-left:10px;">
		                <div>
		                    <div style="float:left;width:150px;">银行汇款支付</div>
		                    <div style="float:left;width:150px;">开户行</div>
		                    <div style="float:left;width:250px;">开户账号</div>
		                    <div style="float:left;width:150px;">开户名</div>
		                    <div class="clear"></div>
		                </div>              
		                <div>
		                    <div style="float:left;width:150px;">
		                        <input type="radio" value="11" onclick="javascript:CheckOut.savePay();" name="radioPay" />
		                                                                中国工商银行 
		                    </div>
		                    <div style="float:left;width:150px;">中国工商银行北大支行</div>
		                    <div style="float:left;width:250px;">9558-8002-0020-3248188</div>
		                    <div style="float:left;width:150px;">王瑞</div>
		                    <div class="clear"></div>
		                </div>        
	                </div> 
                    
                    <?php }else{ ?>
                    
                    <!-- <div id="collegesPayment" style="margin-left:10px;">               
                        <div>
                            <div style="float:left;width:200px;">货到付款</div>
                            <div style="float:left;width:200px;">选择您所在的区域</div>
                            <div style="float:left;width:200px;">备注</div>
                            <div class="clear"></div>
                        </div>  
                        <div>
                            <div style="width:200px;">
                                <input type="radio" value="1" onclick="javascript:CheckOut.savePay();" name="radioPay" checked="checked" />
                                                                              高校货到付款
                            </div>
                        </div>
                    </div>  -->
                    
                    <div id="alipayPayment" style="margin-top:10px;margin-left:10px;">
                        <div>
                            <div style="float:left;width:200px;">网上第三方支付</div>
                            <div style="float:left;width:200px;">汇入账号</div>
                            <div style="float:left;width:200px;">如何支付</div>
                            <div class="clear"></div>
                        </div>      
                        <div>
                            <div style="float:left;width:200px;">
                                <input type="radio" value="3" onclick="javascript:CheckOut.savePay();" name="radioPay" checked="checked" />
                                                                        支付宝 
                            </div>
                            <div style="float:left;width:200px;">pay@akimimi.com</div>
                            <div style="float:left;width:200px;">
                                <a href="#">查看详细帮助</a>
                            </div>
                            <div class="clear"></div>
                        </div>
                    </div>
                    
                    <div id="bankPayment" style="margin-top:10px;display:none;margin-left:10px;">
                        <div>
                            <div style="float:left;width:150px;">银行汇款支付</div>
                            <div style="float:left;width:150px;">开户行</div>
                            <div style="float:left;width:250px;">开户账号</div>
                            <div style="float:left;width:150px;">开户名</div>
                            <div class="clear"></div>
                        </div>              
                        <div>
                            <div style="float:left;width:150px;">
                                <input type="radio" value="11" onclick="javascript:CheckOut.savePay();" name="radioPay" />
                                                                        中国工商银行 
                            </div>
                            <div style="float:left;width:150px;">中国工商银行北大支行</div>
                            <div style="float:left;width:250px;">9558-8002-0020-3248188</div>
                            <div style="float:left;width:150px;">王瑞</div>
                            <div class="clear"></div>
                        </div>        
                    </div> 
                    
                    <?php } ?>
	                     
	            </div>
	            <!-- payment part end -->
	            <!-- invoice part start -->
	            <div class="checkout_item" style="margin-left:10px;margin-top:10px;margin-bottom:10px;">
	                <div style="font-size:14px; font-weight:bold; padding-top:10px; padding-bottom:10px; padding-left:5px;color:#333"">发票</div>
	                <div style="margin-left:10px;">
	                    <div>
	                                                                发票抬头：
	                        <input id="invoiceTitle" type="text" size="35" name="invoiceTitle" />
	                    </div>
	                </div>      
	            </div>
	            <!-- invoice part end -->
	            <!-- promotion start -->
	            <div class="checkout_item" style="margin-left:10px;margin-top:10px;margin-bottom:10px;">
	                <div style="font-size:14px; font-weight:bold; padding-top:10px; padding-bottom:10px; padding-left:5px;color:#333"">使用折扣</div>
	                <div  style="margin-left:10px;">
	                                                    请输入折扣代码：
	                    <input id="coupon" type="text" name="coupon" size="24" />
	                    <input id="applyCouponBtn" type="button" value="使用折扣" onclick="javascript:CheckOut.useCoupon('input');" />
	                </div>
	                <div style='color:#FF0000;margin-left:110px;'>
	                    <span id='errorInfoCouponTitle'></span>
	                    <span id='errorInfoCouponCode'></span>
	                    <span id='errorInfoCouponStatus'></span>
	                </div>
	                
	            </div>
	            <!-- promotion end -->
                <!-- order info start -->
	            <div class="checkout_item" style="margin-left:10px;margin-top:10px;margin-bottom:10px;">
	                <div style="font-size:14px; font-weight:bold; padding-top:10px; padding-bottom:10px; padding-left:5px;color:#333"">订单金额合计</div>
	                <div>
	                    <div>
	                        <div style="float:left;width:100px;text-align:right">商品合计：</div>
                            <div style="float:left;padding-left:30px;">
                            <?php echo UNIT; ?><label id='merchandiseTotalId'><?php
                                                $merchandiseTotal = 0;
                                                foreach ($shoppingCartInfoToCheckout as $item) {
                                                    $merchandiseTotal += $item['sale_price'] * $item['quantity'];
                                                }
                                                echo number_format($merchandiseTotal, 2);
                                            ?></label>
                                <input type="hidden" id="merchandiseTotal" name="merchandiseTotal" value="<?php echo $merchandiseTotal; ?>" />
                            </div>
                            <div class="clear"></div>
	                        <div style="float:left;width:100px;text-align:right">运货费用：</div>
                            <div style="float:left;padding-left:30px;">
                                <?php  echo UNIT; ?><label id="shippingChargesLabel">0.00</label>
                                <input type="hidden" id="shippingCharges" name="shippingCharges" value="0" />
                            </div>
                            <div class="clear"></div>
	                        <div style="float:left;width:100px;text-align:right">折扣金额：</div>
                            <div style="float:left;padding-left:30px;">
                                <?php echo UNIT; ?><label id="discountLabel">0.00</label>
                                <input type="hidden" id="discount" name="discount" value="0" />
                            </div>
                            <div class="clear"></div>
	                        <div style="float:left;width:100px;text-align:right">发票金额：</div>
                            <div style="float:left;padding-left:30px;">
                                <?php echo UNIT; ?><label id="estimatedTaxLabel"><?php echo number_format($taxPriceTotal, 2); ?></label>
                                <input type="hidden" id="estimatedTax" name="estimatedTax" value="<?php echo $taxPriceTotal; ?>" />
                            </div>
                            <div class="clear"></div>
	                        <div style="float:left;width:100px;text-align:right">实际支付金额：</div>
                            <div style="float:left;padding-left:30px;color:#ff0000;font-size:16px;">
                                <?php echo UNIT; ?><label id="allTotalLabel"><?php echo number_format($merchandiseTotal, 2); ?></label>
                                <input type="hidden" id="allTotal" name="allTotal" value="<?php echo $merchandiseTotal; ?>" />
                            </div>
                            <div class="clear"></div>
	                    </div>
	                </div>      
	            </div>
	            <!-- order info end -->
                <!-- tssm start -->
	            <div class="checkout_item" style="margin-left:10px;margin-top:10px;margin-bottom:10px;">
	                <div style="font-size:14px; font-weight:bold; padding-top:10px; padding-bottom:10px; padding-left:5px;color:#333"">特殊说明</div>
	                <div>
	                    <div style="margin-left:20px;">
	                        <div>
	                          <textarea id="textarea" style="overflow: visible; font-size: 12px; width: 900px; height: 55px;" name="textarea"></textarea>
	                        </div>
	                        <div>说明：您的订单确认后将无法自行修改，如需要更改请咨询在线客服或致电400-66-19686</div>
	                    </div>
	                </div>      
	            </div>
                <!-- tssm end -->
                <div style="MARGIN-LEFT: 400px; padding-top:10px; padding-bottom:10px;">
                    <button type="button" class="submitButton"  onclick="javascript:CheckOut.reviewOrder();" >
                        <img alt="" src="<?php echo ConfigConstants::getTImagePath(); ?>/llc04.gif" width="107" height="33" />
                    </button>
                </div>
                </div>
	        </div>
            
            <div style="margin-left:96px;">
                <input type="image" alt="" src="<?php echo ConfigConstants::getTImagePath(); ?>/llcgouwuche_13.jpg"/>
            </div>
            
        </div>
        <!-- order info end -->
        <!-- order review start -->
        <div id="orderReview" style="display:none; width:1160px; " class="layoutmain">
            
            <div style="width:960px;margin-left:100px; background-color: #fcfcfc;">
                <div>
                    <img src="<?php echo ConfigConstants::getTImagePath(); ?>/dingdan_03.jpg" alt="" style="width:960px;" />
                </div>
                <!-- shopping cart part start -->
                <div class="my_cart1" style="margin-left:-6px;"><img src="<?php echo ConfigConstants::getTImagePath(); ?>/llc3.gif" width="972px" height="41"></div>
              
                <div class="my_cart2" style="margin-left:-6px;width:972px;background-image: url(<?php echo ConfigConstants::getTImagePath(); ?>/llcline.gif); background-repeat:repeat-y; ">
                 
                <div style="margin-left: 10px;margin-bottom: 10px;margin-right: 10px;    background-color:#f4f9fc; padding:3px; width:945px; border-color:#b3d9e6; border-style:solid; border-width:1px;">
                    <div>购物车信息</div>
                    <div style="font-size:14px; padding-top:10px; padding-bottom:10px; padding-left:5px;color:#333; font-family: Arial,Helvetica,sans-serif;">
                        <div style="padding: 1px; background-color: rgb(217, 235, 246); width: 940px; height: 25px; text-align: center; line-height: 25px;">
                            <!-- 
                            <div class="text-center" style="float:left;width:80px;">商品编号</div>
                             -->
                            <div class="text-center" style="float:left;width:200px;">商品名称</div>
                            <div class="text-center" style="float:left;width:100px;">商品单价</div>
                            <div class="text-center" style="float:left;width:80px;">购买数量</div>
                            <div class="text-center" style="float:left;width:120px;">商品总价</div>
                            <div class="text-center" style="float:left;width:100px;">商品折扣</div>
                            <div class="text-center" style="float:left;width:100px;">发票</div>
                            <div class="text-center" style="float:left;width:80px;">税费</div>
                            <div class="text-center" style="float:left;width:80px;">全国联保</div>
                            <div class="clear"></div>
                        </div>
                        <?php 
                            foreach($shoppingCartInfoToCheckout as $item) {
                        ?>
                        <div style="margin-top:10px;margin-bottom:10px;">
                             <!-- 
                            <div class="text-center" style="float:left;width:80px;">
                                <span id="reupc"><?php echo $item['upc']; ?></span>
                            </div>
                             -->
                            <div class="text-center" style="float:left;width:200px;">
                               <label title="<?php echo $item['title']; ?>"><?php echo CommonUtil::cut_str($item['title'], 20, 0); ?></label>
                            </div>
                            <div class="text-center" style="float:left;width:100px;color:red;">
                                <?php echo UNIT; ?>
                                <span id="resalePrice">
                                <?php echo number_format($item['sale_price'], 2); ?>
                                </span>
                            </div>
                            <div class="text-center" style="float:left;width:80px;">
                                <span id="requantity"><?php echo $item['quantity']; ?></span>
                            </div>
                            <div class="text-center" style="float:left;width:120px;color:red;">
                                <?php echo UNIT; ?>
                                <label id='retotalPrice_<?php echo $item['pItemId']; ?>'><?php echo number_format($item['sale_price']*$item['quantity'], 2); ?></label>
                            </div>
                            <div class="text-center" style="float:left;width:100px;color:red;">
                                <?php echo UNIT; ?><span id='rediscountPrice_<?php echo $item['pItemId']; ?>'>0.00</span>
                            </div>
                            <!-- cheque rule init setting -->
                            <div class="text-center" style="float:left;width:100px;" id="reinvoiceInfo_<?php echo $item['pItemId']; ?>"></div>
                            <div class="text-center" style="float:left;width:80px;color:red;"><?php echo UNIT; ?><span id="retaxPrice_<?php echo $item['pItemId']; ?>"></span></div>
                            <div class="text-center" style="float:left;width:80px;" id="reprotection_<?php echo $item['pItemId']; ?>"></div>
                            <!-- cheque rule init setting -->
                            <div class="clear"></div>
                            
                            <div style="margin-left:30px;">
                            <?php 
                                $orderService = new OrderService();
                                $itemId = $item["pItemId"];
                                $itemAttribute = $orderService->getItemAttribute($itemId);
                                if( !empty($itemAttribute) ){
                                    foreach ($itemAttribute as $itemAttr) { ?>
                                    <span style="margin-left:10px;"><?php echo $itemAttr["attr"]; ?></span>
                                    <span style="margin-right:0px; color:#5fb820;"> [ <?php echo $itemAttr["attr_title"]; ?> ] </span>
                                <?php  }  
                                 } ?>
                            </div>
                            
                        </div>
                        <?php } ?>
                        
                        <div style="margin-top:10px;margin-left:30px;display:none;" id='reshowCouponCode' ><?php echo CHECKOUTERRORINFOCOUPONCODETITLE; ?></div>
                        
                        <div style="margin-top:20px;margin-bottom:10px;">
                            <div style="margin-right:50px; text-align:right">
                                                                            商品价格合计(不含运费)：
                                <font color="#ff0000"><?php
                                $merchandiseTotal = 0;
                                foreach ($shoppingCartInfoToCheckout as $item) {
                                    $merchandiseTotal += $item['sale_price'] * $item['quantity'];
                                }
                                echo UNIT;
                                ?>
                                <span id="merchandiseTotalTop"><?php echo number_format($merchandiseTotal, 2); ?></span>
                                -
                                <?php echo UNIT; ?><span id="discountPriceTop">0.00</span>
                                =
                                <?php echo UNIT; ?><span id="itemAllTotalTop"><?php
                                        echo number_format($merchandiseTotal - 0, 2)
                                ?></span>
                                </font>
                            </div>                     
                        </div>
                    </div>              
                </div>
                <!-- shopping cart part end -->
                <!-- address part start -->
                <div class="checkout_item" style="margin-left:10px;margin-top:10px;margin-bottom:10px;">
                    <div style="font-size:14px; font-weight:bold; padding-top:10px; padding-bottom:10px; padding-left:5px;color:#333">送货地址<span style="margin-left:10px;font-size:12px;">[收货地址]</span></div>
                    <div id="readdress" style="margin-left:20px;">
                    
                    </div>
                </div>
                <!-- address part end -->
                <!-- shipping part start -->
                <div class="checkout_item" style="margin-left:10px;margin-top:10px;margin-bottom:10px;">
                    <div style="font-size:14px; font-weight:bold; padding-top:10px; padding-bottom:10px; padding-left:5px;color:#333">送货方式</div>
                    <div style="margin-left:20px;">
                        <span id="redeliveryTitle">送货方式：</span>
                        <span id="redelivery"></span>
                    </div>      
                    <div id="recampusesInfo" style="margin-left:30px;">              
	                    <div>
	                        <span id="recampusesTitle">选择的高校：</span>
	                        <span id="recampuses"></span>
	                    </div>
	                    <div>
	                        <span id="recampusesAgentTitle">高校大使：</span>
	                        <span id="recampusesAgent"></span>
	                    </div>
	                    <div>
	                        <span id="redeliveryTimeTitle">送货时间：</span>
	                        <span id="redeliveryTime"></span>
	                    </div>
                    </div>
                </div>
                <!-- shipping part end -->
                <!-- payment part start -->
                <div class="checkout_item" style="margin-left:10px;margin-top:10px;margin-bottom:10px;">
                    <div style="font-size:14px; font-weight:bold; padding-top:10px; padding-bottom:10px; padding-left:5px;color:#333">支付方式</div>
                    <div style="margin-left:30px;">
                                                      支付方式：<span id="repayment"></span>
                    </div>
                    <div class="clear"></div>
                </div>
                <!-- payment part end -->
                <!-- invoice part start -->
                <div class="checkout_item" style="margin-left:10px;margin-top:10px;margin-bottom:10px;">
                    <div style="font-size:14px; font-weight:bold; padding-top:10px; padding-bottom:10px; padding-left:5px;color:#333">发票</div>
                    <div style="margin-left:20px;">
                        <div>
                                                                    发票抬头：<span id="reinvoiceInfo"></span>
                        </div>
                    </div>      
                </div>
                <!-- invoice part end -->
                                
                <div class="checkout_item" style="margin-left:10px;margin-top:10px;margin-bottom:10px;">
                    <div style="font-size:14px; font-weight:bold; padding-top:10px; padding-bottom:10px; padding-left:5px;color:#333">订单金额合计</div>
                    <div>
                        <div>
                            <div style="float:left;width:100px;text-align:right">商品合计：</div>
                            <div style="float:left;padding-left:30px;">
                            <?php echo UNIT; ?><label id='remerchandiseTotalId'><?php
                                                $merchandiseTotal = 0;
                                                foreach ($shoppingCartInfoToCheckout as $item) {
                                                    $merchandiseTotal += $item['sale_price'] * $item['quantity'];
                                                }
                                                echo number_format($merchandiseTotal, 2);
                                            ?></label>
                            </div>
                            <div class="clear"></div>
                            <div style="float:left;width:100px;text-align:right">运货费用：</div>
                            <div style="float:left;padding-left:30px;">
                                <?php  echo UNIT; ?><label id="reshippingChargesLabel">0.00</label>
                            </div>
                            <div class="clear"></div>
                            <div style="float:left;width:100px;text-align:right">折扣金额：</div>
                            <div style="float:left;padding-left:30px;">
                                <?php echo UNIT; ?><label id="rediscountLabel">0.00</label>
                            </div>
                            <div class="clear"></div>
                            <div style="float:left;width:100px;text-align:right">发票金额：</div>
                            <div style="float:left;padding-left:30px;">
                                <?php echo UNIT; ?><label id="reestimatedTaxLabel"><?php echo number_format($taxPriceTotal, 2); ?></label>
                            </div>
                            <div class="clear"></div>
                            <div style="float:left;width:100px;text-align:right">实际支付金额：</div>
                            <div style="float:left;padding-left:30px;color:#ff0000;font-size:16px;">
                                <?php echo UNIT; ?><label id="reallTotalLabel"><?php echo number_format($merchandiseTotal, 2); ?></label>
                            </div>
                            <div class="clear"></div>
                        </div>
                    </div>      
                </div>
                
                <div class="checkout_item" style="margin-left:10px;margin-top:10px;margin-bottom:10px;">
                    <div style="font-size:14px; font-weight:bold; padding-top:10px; padding-bottom:10px; padding-left:5px;color:#333">特殊说明</div>
                    <div style="margin-left:20px;" id="reInstruction"></div>      
                </div>
                
                <div style="margin-left:400px;">
                
                    <button onclick="javascript:CheckOut.placeOrder();" class="submitButton" style="margin-left:0px;padding-top:0px;" type="button">
                        <img alt="" src="<?php echo ConfigConstants::getTImagePath(); ?>/llc05.gif" />
                    </button>
                    <!-- 
                    <input id="placeOrderButton" type="image" alt="" src="<?php echo ConfigConstants::getTImagePath(); ?>/llc05.gif" onclick="javascript:CheckOut.placeOrder();" />
                     -->
                </div>
                
                </div>
                
                <div style="margin-left:2px;margin-left:-4px;">
                    <input type="image" alt="" src="<?php echo ConfigConstants::getTImagePath(); ?>/llcgouwuche_13.jpg"/>
                </div>
            </div>
	            
        </div>
        <!-- order review start -->
        </form>
        
        <!-- footer part begin -->
        <?php echo FooterView::getCommonFooterView(); ?>
        <!-- footer part end -->
        
        
        <!-- all school info start -->
        
        <div class="allSchool" id="allSchool" style="display:none;">
            <div id="city" class="city">
            <?php 
                for($i = 0; $i < count($province); $i++) {
            ?>
                <span id="title_<?php echo $i;?>" style="background-color: rgb(255, 255, 255);"><a href="javascript:CheckOut.showArea(<?php echo $province[$i]["id"]; ?>)"><?php echo $province[$i]["title"]; ?></a></span>
            <?php } ?>
            </div>
            <div id="area" class="area">
            
                <ul id="allCampuses">
                    <?php 
                        foreach ($campuses as $name) {
                    ?>
                    <li><a href="javascript:CheckOut.viewArea('<?php echo $name["area_name"];?>', '<?php echo $name["id"];?>');"><?php echo $name["area_name"];?></a></li>
                    <?php 
                        }
                    ?>
                </ul>
            
            </div>
            <div style="margin-left:400px;">
              <input name="button" type="button" value="关闭" onClick="CheckOut.closeBtn();" />
            </div>
        </div>
        
        <!-- all school info end -->
        
    <!-- prompt inventory info -->
    <div id="checkcurrent" style="display: none; border: 2px solid #76A73A; padding: 5px;  left: 40%; top: 40%; position: absolute; z-index: 9999; width: 350px; height: auto; background-color: rgb(255, 255, 255); font-size: 12px; text-align: center;">
        <div style="margin-top: 15px; margin-bottom: 10px; text-align: left; margin-left: 5px;"><?php echo SHOPPINGCARTPQUANTITYROMPT; ?></div>
        <div id="currentinfo" style="margin-bottom: 10px; text-align: left; margin-left: 5px;"> 
        
        </div>
        <div style="margin: 0pt auto; bottom: 3px; left: 40%; color: rgb(255, 0, 0); font-weight: bold; cursor: pointer;">
            <span onclick="javascript:window.location='/u/cart';"> [返回购物车] </span>
        </div>
    </div>
    <!-- prompt inventory info -->
    
    <!-- prompt item sale price info -->
    <div id="pricePrompt" style="display: none; border: 2px solid #76A73A; padding: 5px;  left: 40%; top: 40%; position: absolute; z-index: 9999; width: 350px; height: auto; background-color: rgb(255, 255, 255); font-size: 12px; text-align: center;">
        <div style="margin-top: 15px; margin-bottom: 10px; text-align: left; margin-left: 5px;">商品售价已经更新</div>
        <div id="pricePromptInfo" style="margin-bottom: 10px; text-align: left; margin-left: 5px;"> 
        
        </div>
        <div style="margin: 0pt auto; bottom: 3px; left: 40%; color: rgb(255, 0, 0); font-weight: bold; cursor: pointer;">
            <span onclick="javascript:window.location='/u/cart';"> [返回购物车] </span>
        </div>
    </div>
    <!-- prompt item sale price info -->
    
    
        <script type='text/javascript'>
        //<![CDATA[ 
           CheckOut.validateChequeRule();          
           CheckOut.countAllTotalPrice();          
           CheckOut.countShipFee();     
           CheckOut.autoPromotion("<?php echo $strCodes; ?>");     
        //]]> 
        </script> 
    </body>
</html>
